$(function() {
	$.ajaxSetup({
		cache : false,
		async : false,
		complete : function(xhr, status) {
			if (xhr.getResponseHeader("nologin") != null)
				sessionOut();
		}
	});

	$('.navbar-nav li').click(function() {
		$('#mainmenu').children().removeClass('active');
		$(this).addClass('active');
		$('#topmenu').children('div').css('display', "none");
		$('#i' + this.id).css('display', "");
	});
});
function sessionOut() {
	alert("登录已超时, 请重新登录!");
	top.location.href = '/login';
}